package cate.common.table.guild;

import cate.common.table.ERow;
import cate.common.table.XSSFRowWrap;
import easy.java.dev.note.NoteField;

public class GuildActiveTaskRow extends ERow {
    @NoteField(value = "次数上限")
    public int limitNum;

    @NoteField(value = "任务类型")
    public int type;

    @NoteField(value = "任务目标")
    public int times;

    @NoteField(value = "单次活跃贡献值")
    public int exp;

    @NoteField(value = "刷新周期", detail = "0是每天刷新，1是每周刷新")
    public byte cycle;

    @Override
    public void parse(XSSFRowWrap xrw) {
        super.parse(xrw);
        this.id = xrw.getInteger("任务ID", 1);
        this.type = xrw.getInteger("任务类型", 1);
        this.times = xrw.getInteger("任务目标", 1);
        this.limitNum = xrw.getInteger("次数上限", 0);
        this.limitNum = this.times * this.limitNum;
        this.exp = xrw.getInteger("单次活跃值", 0);
        this.cycle = xrw.getByte("刷新周期", (byte) 0);
    }

}

